package com.ff.discounts.component.main

import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.ff.discounts.entity.response.onSuccess
import com.ff.discounts.library.log.HiLog
import com.ff.discounts.model.BaseViewModel
import com.ff.discounts.repository.DefaultNetworkRepository
import kotlinx.coroutines.launch

/**
 * 首页vm
 * @author: fufang
 * @date: 2023/10/16
 */
class MainViewModel:BaseViewModel() {
    /**
    * 获取数据
    */
    fun loadMore() {
        viewModelScope.launch(coroutineExceptionHandler) {
           DefaultNetworkRepository.getAllList().onSuccess(viewModel){

           }

        }
    }

}